package Z.dailyExercise.April;

import java.util.ArrayList;
import java.util.List;

public class _94二叉树的中序遍历 {
    List<Integer> res = new ArrayList<>();
    public List<Integer> inorderTraversal(TreeNode root) {
        reserve(root);
        return res;


    }

    public void reserve(TreeNode node){
        if (node == null){
            return;
        }

        reserve(node.left);
        res.add(node.val);
        reserve(node.right);

    }
}
